import Vue from 'vue'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n
// import locale from 'element-ui/lib/locale/lang/en' // lang i18n
import Cookies from 'js-cookie'
import '@/styles/index.scss' // global css
// 防止警告：Added non-passive event listener to a scroll-blocking 'mousewheel' event.
import 'default-passive-events'

import App from './App'
import store from './store'
import router from './router'

import '@/icons' // icon
import '@/permission' // permission control

import { cloneDeep } from 'lodash';


Vue.prototype.$cloneDeep = cloneDeep;

// set ElementUI lang to EN
Vue.use(ElementUI, { locale })
// 如果想要中文版 element-ui，按如下方式声明
// Vue.use(ElementUI)

// 该组件是表格内容过多省略号展示，弹出的 tooltip 不能复制，通过该插件直接按住alt可以选中复制，注意：要放在Vue.use(element)后面
import ElTablePatchTooltip from '@/components/ETable/el-table-patch_tooltip'
Vue.use(ElTablePatchTooltip)

Vue.config.productionTip = false
Vue.prototype.$cookies = Cookies

if (process.env.NODE_ENV !== 'development') {
  // 不是开发环境，打印信息都不显示
  console.log = function () { }
  console.error = function () { }
  console.dir = function () { }
}

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
